package com.songcha.library_base.compose

import android.view.View
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.ComposeView
import com.songcha.library_base.R
import com.songcha.library_base.base.BaseFragment

abstract class BaseComposeFragment:BaseFragment(),IComposePage {
    override fun getLayoutId(): Int {
        return R.layout.base_fragment_compose
    }

    override fun initOnCreateView(): View? {
        val view = super.initOnCreateView()
        if(mRootView!=null){
            val composeView = mRootView!!.findViewById<ComposeView>(R.id.base_compose)
            composeView.setContent {
                ComposeRootView()
            }
        }
        return view
    }

}